package com.baidu.cmsCommes.pojo;

import com.sun.imageio.plugins.common.I18N;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: BSS
 * @create: 2020/6/17/20:32
 */
@Data
public class User {
    public interface save{}
    public interface update{}
    public interface delete{}
    public interface select{}

    @Null(groups = save.class)
    @NotNull(groups = update.class)
    private Integer id;
    private Date create_date;
    @Email(message = "电子邮箱不能为空或格式不正确")
    private String email;
    private String nickname;
    @NotNull(message = "密码不能为空")
    @NotBlank(message = "密码不能为空字符串")
    private String password;
    private String phone;
    private Integer status;
    @NotNull(message = "账号不能为空")
    @NotBlank(message = "账号不能为空字符串")
    private String username;

    public User() {
    }

    public User(Integer id, Date create_date,String email, String nickname,String password, String phone, Integer status,String username) {
        this.id = id;
        this.create_date = create_date;
        this.email = email;
        this.nickname = nickname;
        this.password = password;
        this.phone = phone;
        this.status = status;
        this.username = username;
    }

    public void setId(Integer id){
        this.id = id;
    }
}
